package com.earl.eatbao.dao.eatbao;

import java.util.List;

import com.earl.eatbao.commons.dao.BaseRepsitoty;
import com.earl.eatbao.domain.eatbao.Orders;

public interface OrdersDao extends BaseRepsitoty<Orders,Long> {

    /**
     * 查询所用商家未接订单
     * @param shopUserId
     * @return
     */
    List<Orders> findByShopUserIdAndIsDeleteFalse(Long shopUserId);

    /**
     * 查询用户的所有订单
     * @param userId
     * @return
     */
    List<Orders> findByUserIdAndIsDeleteFalse(Long userId);

    /**
     * 查看商家未查看订单
     * @param shopperId
     * @return
     */
	List<Orders> findByShopUserIdAndWatchFalseAndIsDeleteFalse(Long shopperId);

	/**
	 * 查询用户指定状态订单
	 * @param userId
	 * @param i
	 * @return
	 */
	List<Orders> findByUserIdAndStatusAndIsDeleteFalse(Long userId, int i);

	/**
	 * 查看商家指定状态订单
	 * @param shopperId
	 * @param i
	 * @return
	 */
	List<Orders> findByShopUserIdAndStatusAndIsDeleteFalse(Long shopperId, int i);

	/**
	 * 根据订单状态查询订单
	 * @param status
	 * @return
	 */
    List<Orders> findByStatus(Integer status);
}
